﻿<div ng-controller="productController">
    <form ng-submit="save()">
        <input type="text" ng-model="product.name" placeholder="Nombre" required>
        <input type="text" ng-model="product.detail" placeholder="detail">
        <input type="text" ng-model="product.price" placeholder="Price">
        
        
        <select ng-model="product.measureUnitId"
                ng-options="value.id as value.name for value in measureUnitList">
            <option>--</option>
        </select>{{product.measureUnitId}}

        <button type="submit">Save</button>
    </form>


        <ul>
            <li ng-repeat="d in list | filter:name">
                {{ d.name }} {{ d.measureUnitModel.name }} 
                <a href="" ng-click="getById(d)">update</a>
                <a href="" ng-click="delete(d)">x</a>
            </li>
        </ul>
</div>